# -*- coding: utf-8 -*-
"""
@Project: Msptest
@Author: 余振新
@File name: 数据清理.py
@Create time: 2023/7/27 15:42
"""
from common.mysql_control import MySqlDB


def 数据清理():
    MySqlDB().execute("delete from cxjk_xspt.mt_admittance where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_depart where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_depart_disease where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_fee where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_follow_community_otc where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_follow_health where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_follow_hospital_depart where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_follow_hospital_other where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_follow_otc_patient where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_idea_coach where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_join_material where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_meeting where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_meeting_theme where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_push_logs where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_question_share where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_question_suggest where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_state_record where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_teacher where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_teacher_role where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_user where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_vip where meeting_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")
    MySqlDB().execute("delete from cxjk_xspt.mt_meeting_file where business_no in (select meeting_no from cxjk_xspt.mt_meeting where address ='UI自动化测试数据')")


if __name__ == '__main__':
    数据清理()
